package com.atguigu.spi;

import org.apache.dubbo.rpc.model.ScopeModel;
import org.apache.dubbo.rpc.model.ScopeModelUtil;

public class Car$Adaptive implements com.atguigu.spi.Car {
    public java.lang.String carType() {
        throw new UnsupportedOperationException("The method public abstract java.lang.String com.atguigu.spi.Car.carType() of interface com.atguigu.spi.Car is not adaptive method!");
    }

    public java.lang.String carName(org.apache.dubbo.common.URL arg0) {
        if (arg0 == null) throw new IllegalArgumentException("url == null");
        org.apache.dubbo.common.URL url = arg0;
        String extName = url.getParameter("car", "energy");
        if (extName == null)
            throw new IllegalStateException("Failed to get extension (com.atguigu.spi.Car) name from url (" + url.toString() + ") use keys([car])");
        ScopeModel scopeModel = ScopeModelUtil.getOrDefault(url.getScopeModel(), com.atguigu.spi.Car.class);
        com.atguigu.spi.Car extension = (com.atguigu.spi.Car) scopeModel.getExtensionLoader(com.atguigu.spi.Car.class).getExtension(extName);
        return extension.carName(arg0);
    }
}